SpdrUserCancel
Records inserted into this table cancels all parent orders associated with userName/clientFirm
METADATA
Attribute | Value |
---|---|
Topic | 3985-parent-orders |
MLink Token | SystemData |
Product | SRTrade |
accessType | SELECT,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
cxlUserName | VARCHAR(24) | PRI | '' | Cancel all parent orders associated with cxlUserName and clientFirm |
clientFirm | VARCHAR(16) | PRI | '' | |
sysEnvironment | enum - SysEnvironment | 'None' | original source sys environment Stable Current etc | |
runStatus | enum - RunStatus | 'None' | original source run status ProdBeta | |
cxlReason | VARCHAR(16) | '' | ||
engineName | VARCHAR(32) | '' | set by the engine handling event should be blank on arrival | |
modifiedBy | VARCHAR(24) | '' | user who last modified this record | |
modifiedIn | enum - SysEnvironment | 'None' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of last modification |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
cxlUserName | 1 |
clientFirm | 2 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRTrade`.`MsgSRUserCancel` (
`cxlUserName` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'Cancel all parent orders associated with cxlUserName and clientFirm',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None' COMMENT 'original (source) sys environment [Stable, Current, etc]',
`runStatus` ENUM('None','Prod','Beta','UAT','SysTest') NOT NULL DEFAULT 'None' COMMENT 'original (source) run status [Prod,Beta]',
`cxlReason` VARCHAR(16) NOT NULL DEFAULT '',
`engineName` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'set by the engine handling event (should be blank on arrival)',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`cxlUserName`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records inserted into this table cancels all parent orders associated with userName/clientFirm';
SELECT TABLE EXAMPLE QUERY
SELECT
`cxlUserName`,
`clientFirm`,
`sysEnvironment`,
`runStatus`,
`cxlReason`,
`engineName`,
`timestamp`
FROM `SRTrade`.`MsgSRUserCancel`
WHERE
/* Replace with a VARCHAR(24) */
`cxlUserName` = 'Example_cxlUserName'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRTrade`.`MsgSRUserCancel`(
/* Replace with a VARCHAR(24) */
`cxlUserName`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') */
`sysEnvironment`,
/* Replace with a ENUM('None','Prod','Beta','UAT','SysTest') */
`runStatus`,
/* Replace with a VARCHAR(16) */
`cxlReason`,
/* Replace with a VARCHAR(32) */
`engineName`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_cxlUserName',
'Example_clientFirm',
'None',
'None',
'Example_cxlReason',
'Example_engineName',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRTrade`.`MsgSRUserCancel`
WHERE
/* Replace with a VARCHAR(24) */
`cxlUserName` = 'Example_cxlUserName'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SpdrUserCancel' ORDER BY ordinal_position ASC;